import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import KxWorkerAttendanceBarChart from "./index";

const meta = {
  title: "柱状图/可信近一个月出勤率柱状图KxWorkerAttendanceBarChart",
  component: KxWorkerAttendanceBarChart,
  tags: ["autodocs"],
  argTypes: {},
  decorators: [
    (Story) => (
      <div
        style={{ backgroundColor: "#031857", height: "313px", width: "516px" }}
      >
        <Story />
      </div>
    ),
  ],
} satisfies Meta<typeof KxWorkerAttendanceBarChart>;

export default meta;
type Story = StoryObj<typeof meta>;

export const basic: Story = {
  args: {
    dataSource: [
      {
        name: "马銮湾保障房地铁社区二期A01~03地块",
        planAmount: 190,
        amount: 120,
        percent: 63,
      },
      {
        name: "马銮湾保障房地铁社区二期A04~07地块",
        planAmount: 180,
        amount: 145,
        percent: 80,
      },
      {
        name: "保障性住房龙泉公寓一期",
        planAmount: 250,
        amount: 220,
        percent: 88,
      },
      { name: "洪茂居住区一期", planAmount: 210, amount: 140, percent: 66 },
      { name: "东园保障性住房", planAmount: 210, amount: 140, percent: 66 },
    ],
  },
};
